import React from 'react'

export default class child1 extends React.Component{
    constructor(props){
        super(props)
        this.state={
            money:this.props.money
        }
    }
    changeInput=(e)=>{
        this.setState({
            money:e.target.value
        })
        
    }
    componentDidMount(){
        console.log(this.money,111111);
    }
    render(){
        return(
            <div>
                <p>我是child1</p>
                <input type="text" value={this.props.money}  onChange={this.props.moneyChange}/>
            </div>
        )
    }
}